
<?php
	//header("Cache-Control: no-store, no-cache, must-revalidate");
	session_start();
	if (isset($_SESSION) && !empty($_SESSION["tipousuario"]) && $_SESSION["tipousuario"] == "A" ){
	
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
	<TITLE>Morsa - LTH</TITLE>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />	

	<script type="text/javascript" src="./js/jquery-1.5.min.js"></script>
	<link rel="stylesheet" type="text/css" media="screen" href="css/redmond/jquery-ui-1.8.11.custom.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="js/jqGrid/css/jquery.ui.jqgrid.css" />

	<link rel="stylesheet" type="text/css" media="screen" href="css/local.css?ms=<?php echo time(); ?>" />

	<script type="text/javascript" src="./js/lth.js?ms=<?php echo time(); ?>"></script>

	<link rel='stylesheet' type='text/css' href='js/fullcalendar/fullcalendar.css' /> 
	<script type='text/javascript' src='js/fullcalendar/fullcalendar.js'></script>

	<script type="text/javascript" src="js/jqGrid/js/i18n/grid.locale-es.js"></script>
	<script type="text/javascript" src="js/jqGrid/js/jquery.jqGrid.min.js"></script>

	<link href="../modal/facebox.css" media="screen" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="../modal/facebox.js"></script>
	<script type='text/javascript'>
		$(document).ready(function() {
			fnGo('calendario.php');
			 $('a[rel*=facebox]').facebox({
				loadingImage : '../modal/loading.gif',
			        closeImage   : '../modal/closelabel.png'
			  });
			
		});
		function fnCargaEvento(evento){
			$('#DiaActual').attr("href", 'grid.php?date='+evento)
			$('#DiaActual').click();
		}
		function fnCargaEvento_nuevo(evento){
			$('#DiaActual').attr("href", 'calendario_dia.php?date='+evento)
			$('#DiaActual').click();
		}
		/*
		function fnCargaEvento(evento){
			jQuery.facebox({ 
				ajax: 'grid.php?date='+evento, 
				loadingImage : '../modal/loading.gif',
				closeImage   : '../modal/closelabel.png'
			});
		}*/
	</script>

</HEAD>

<BODY>
	<table align='center' border="0" width="95%" height="95%">
	<tr valign="top">
		<!--
		<td>
			<table align='center'>
			<TR>
				<TD colspan='2' height='150'>&nbsp;</TD>
			</TR>
			<TR>
				<TD colspan='2' align='center'>Calendario</TD>
			</TR>
			<TR>
				<TD colspan='2' align='center'><a href="#" onclick="fnGo('calendario.php');return false;">Planificacion de calendario</a></TD>
			</TR>
			<TR>
				<TD colspan='2' align='center'><a href="#" onclick="fnGo('setCalendar');return false;">Consulta por cliente</a> </TD>
			</TR>
			<TR>
				<TD colspan='2' align='center'><a href="#" onclick="fnGo('setCalendar');return false;">Consulta por fechas</a> </TD>
			</TR>
			</TABLE>
		</td>
		-->
		<td>
			<div style="overflow: auto; height: 750px; width: 700px;" id="stage"></div>
		</td>
	</tr>
	</table>
	<a id="DiaActual" href="" rel="facebox" width="700px" ></a>
	
</BODY>
</HTML>
	<?php 	}else if ($_SESSION["tipousuario"] == "V"){ ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
	<TITLE>Morsa - LTH</TITLE>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />	

	<script type="text/javascript" src="./js/jquery-1.5.min.js"></script>
	<link rel="stylesheet" type="text/css" media="screen" href="css/redmond/jquery-ui-1.8.11.custom.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="js/jqGrid/css/jquery.ui.jqgrid.css" />

	<link rel="stylesheet" type="text/css" media="screen" href="css/local.css?ms=<?php echo time(); ?>" />

	<script type="text/javascript" src="./js/lth.js?ms=<?php echo time(); ?>"></script>

	<link rel='stylesheet' type='text/css' href='js/fullcalendar/fullcalendar.css' /> 
	<script type='text/javascript' src='js/fullcalendar/fullcalendar.js'></script>

	<script type="text/javascript" src="js/jqGrid/js/i18n/grid.locale-es.js"></script>
	<script type="text/javascript" src="js/jqGrid/js/jquery.jqGrid.min.js"></script>

	<link href="../modal/facebox.css" media="screen" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="../modal/facebox.js"></script>
	<script type='text/javascript'>
		$(document).ready(function() {
			fnGo('calendario_v.php');
			 $('a[rel*=facebox]').facebox({
				loadingImage : '../modal/loading.gif',
			        closeImage   : '../modal/closelabel.png'
			  });
			
		});
		function fnCargaEvento(evento){
			$('#DiaActual').attr("href", 'grid.php?date='+evento)
			$('#DiaActual').click();
		}
		function fnCargaEvento_nuevo(evento){
			$('#DiaActual').attr("href", 'calendario_dia_v.php?date='+evento)
			$('#DiaActual').click();
		}
		/*
		function fnCargaEvento(evento){
			jQuery.facebox({ 
				ajax: 'grid.php?date='+evento, 
				loadingImage : '../modal/loading.gif',
				closeImage   : '../modal/closelabel.png'
			});
		}*/
	</script>

</HEAD>

<BODY>
	<table align='center' border="0" width="95%" height="95%">
	<tr valign="top">
		<td>
			<div style="overflow: auto; height: 750px; width: 700px;" id="stage"></div>
		</td>
	</tr>
	</table>
	<a id="DiaActual" href="" rel="facebox" width="700px" ></a>
	
</BODY>
</HTML>
	<?php } ?>